﻿
namespace Inovout.Data.Redis
{
    public abstract class RedisCommand
    {
        public RedisCommand()
        {
        }

        public RedisConnection Connection
        {
            get;
            internal set;
        }

        internal RedisCommandResult<T> Execute<T>(RedisLiteral literal, params RedisCommandParameter[] args)
        {
            RedisCommandResult<T> commandResult;
            Connection.Executor.Execute(RedisCommandScript.Create(this, literal, args, out commandResult));
            return commandResult;
        }
    }
}
